import React from 'react'
import './index.sass'
// 条件筛选栏标题数组：
const titleList = [
  { title: '区域', type: 'area' },
  { title: '方式', type: 'mode' },
  { title: '租金', type: 'price' },
  { title: '筛选', type: 'more' }
]
export default function FilterTitle({ titleSelectedStatus, onClick }) {
  return (
    <div className="filter-title">
      {
        titleList.map(i =>
          <div className="item-box"
            key={i.type}
            onClick={() => onClick(i.type)}
            style={{ color: titleSelectedStatus[i.type] ? '#21b97a' : '#333' }}
          >
            <span>{i.title}</span>
            <i className="iconfont icon-arrow" />
          </div>
        )
      }
    </div>
  )
}
